﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace Enterprise.Management.Caches
{
    public class ConfigCache
    {
        public static string SharedPath
        {
            get
            {
                string path = ConfigurationManager.AppSettings["SharedPath"];
                if (!path.EndsWith("\\")) path += "\\";
                path += DateTime.Now.ToString("yyyyMM") + "\\";
                return path;
            }
        }

        public static bool SessionCache
        {
            get
            {
                string cache = ConfigurationManager.AppSettings["LoginCache"].ToLower();
                switch (cache)
                { 
                    case "cookie":
                        return false;
                    default:
                        return true;
                }
            }
        }
    }
}